<?php // $Id: index.php 11 2008-07-30 15:46:18Z the.sk89q $

/**
 * index.php - reservation form
 *
 * @version: $Id: index.php 11 2008-07-30 15:46:18Z the.sk89q $
 * @license http://www.gnu.org/copyleft/gpl.html
 * @package dpmatchreserve
 * 
 */

require_once "./common.php";

$smarty->assign('title', 'Lease a Match Server');

// ===============================
// Generate list of servers
// ===============================

$servers = array();

foreach ($CONFIG['servers'] as $i => $server) {
    $servers[$i] = array('name' => $server['name'],
                         'host' => $server['host'],
                         'port' => $server['port']);
}

$smarty->assign('servers', $servers);

// ===============================
// Get user-configurable cvars
// ===============================

$smarty->assign('enable_autoselect', $CONFIG['enable_autoselect']);
$smarty->assign('default_settings', $CONFIG['default_settings']);
$smarty->assign('user_settings', $CONFIG['user_settings']);
$smarty->assign('bot_check_string', $CONFIG['bot_check_string']);

// ===============================
// Send it off
// ===============================

$smarty->assign('form_action', 'reserve.php');

$smarty->display('index.tpl');
